/***
 * @file:
 * @author: xiaoyu
 * @Date: 2021-07-06 17:28:32
 */
const state = {
  name: '张三'
}

const getters = {
  getName(state: any) {
    return state.name
  }
}

const mutations = {
  SET_NAME(state: any, data: any) {
    state.name = data.name
  }
}

const actions = {
  setName({ commit }: any, data: any) {
    commit('SET_NAME', data)
  }
}

export default {
  namespaced: true,
  state,
  getters,
  mutations,
  actions
}
